package net.maku.project.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import net.maku.framework.common.utils.DateUtils;
import net.maku.project.entity.ProcessStepsEntity;
import net.maku.system.entity.SysUserEntity;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 流程状态表
*
* @author 艾力 1106997025@qq.com
* @since 1.0.0 2024-07-09
*/
@Data
@Schema(description = "流程状态表")
public class ProcessStatesVO implements TransPojo, Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "状态ID，主键，自增")
	private Long id;

	@Schema(description = "项目ID")
	private Long projectId;

	@Schema(description = "流程阶段ID")
	private Long stageId;

	@Schema(description = "所属环节ID")
	@Trans(type = TransType.SIMPLE,target = ProcessStepsEntity.class,fields = "name",ref = "stepName")
	private Long stepId;

	@Schema(description = "操作人")
	@Trans(type = TransType.SIMPLE,target = SysUserEntity.class,fields = "realName",ref = "updateUserName")
	private Long operatorId;

	@Schema(description = "所属环节名称")
	private String stepName;

	@Schema(description = "操作人")
	private String updateUserName;

	@Schema(description = "当前状态")
	private String status;

	@Schema(description = "企业材料确认")
	private String matlConfirm;

	@Schema(description = "是否完成")
	private Integer completed;

	@Schema(description = "开始时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
	private LocalDateTime startTime;

	@Schema(description = "完成时间")
	@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
	private LocalDateTime completionTime;

	@Schema(description = "持续时间")
	private String duration;

	@Schema(description = "完成时限")
	private String deadLine;



	@Schema(description = "计时器是否启动")
	private Integer timerStarted;

	@Schema(description = "环节是否启用")
	private Integer branchPath;

	@Schema(description = "备注")
	private String remark;



}